package com.shixun.dds_11.controller;


import com.shixun.dds_11.context.BaseContext;
import com.shixun.dds_11.entity.DdsNote;
import com.shixun.dds_11.entity.DdsUser;
import com.shixun.dds_11.result.Result;
import com.shixun.dds_11.service.IDdsNoteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author YSP
 * @since 2024-07-05
 */
@RestController
@RequestMapping("/dds11/note")
@Api(tags = "浏览记录接口")
@Slf4j
@CrossOrigin
public class DdsNoteController {

    @Autowired
    IDdsNoteService iDdsNoteService;




    @GetMapping()
    @ApiOperation("查询浏览记录")
    public Result<List> info( ){
        log.info("查询浏览记录");
        Integer userId = BaseContext.getCurrentId().intValue();
        List info = iDdsNoteService.info(userId);
        return Result.success(info);
    }
}
